package com.redare.dev.smart.generator.service;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.resource.Resource;
import org.eclipse.jetty.xml.XmlConfiguration;

/**
 * Created by yangqy on 2020/9/8.
 */
public class SmartGeneratorService {


    public static void main(String[] args) throws Exception {
        Resource fileXml = null;
        Server server = null;
        try {
            fileXml = Resource.newSystemResource("jetty.xml");
            XmlConfiguration configuration = new XmlConfiguration(fileXml);
            server = (Server) configuration.configure();
            server.start();
        } catch (Exception e) {
            if (server != null) {
                server.stop();
            }
        }
    }
}
